package com.hutao.manage.pojo;

import java.math.BigDecimal;

import com.hutao.manage.util.BigDecimalUtil;

public class OutPatientAge {
	
	private Integer year5Count;
	
	private BigDecimal year5Rate;
	
	private Integer year14Count;
	
	private BigDecimal year14Rate;
	
	private Integer year44Count;
	
	private BigDecimal year44Rate;
	
	private Integer year60Count;
	
	private BigDecimal year60Rate;
	
	private Integer yearMoreCount;
	
	private BigDecimal yearMoreRate;
	
	private Integer totalCount;
	
	private BigDecimal avgYear;

	public Integer getYear5Count() {
		return year5Count;
	}

	public void setYear5Count(Integer year5Count) {
		this.year5Count = year5Count;
	}

	public Integer getYear14Count() {
		return year14Count;
	}

	public void setYear14Count(Integer year14Count) {
		this.year14Count = year14Count;
	}

	public Integer getYear44Count() {
		return year44Count;
	}

	public void setYear44Count(Integer year44Count) {
		this.year44Count = year44Count;
	}

	public Integer getYear60Count() {
		return year60Count;
	}

	public void setYear60Count(Integer year60Count) {
		this.year60Count = year60Count;
	}

	public Integer getYearMoreCount() {
		return yearMoreCount;
	}

	public void setYearMoreCount(Integer yearMoreCount) {
		this.yearMoreCount = yearMoreCount;
	}

	public Integer getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}

	
	
	
	
	public BigDecimal getAvgYear() {
		return avgYear;
	}

	public void setAvgYear(BigDecimal avgYear) {
		this.avgYear = avgYear;
	}

	public BigDecimal getYear5Rate() {
		return year5Rate;
	}

	public void setYear5Rate(BigDecimal year5Rate) {
		this.year5Rate = year5Rate;
	}

	public BigDecimal getYear14Rate() {
		return year14Rate;
	}

	public void setYear14Rate(BigDecimal year14Rate) {
		this.year14Rate = year14Rate;
	}

	public BigDecimal getYear44Rate() {
		return year44Rate;
	}

	public void setYear44Rate(BigDecimal year44Rate) {
		this.year44Rate = year44Rate;
	}

	public BigDecimal getYear60Rate() {
		return year60Rate;
	}

	public void setYear60Rate(BigDecimal year60Rate) {
		this.year60Rate = year60Rate;
	}

	public BigDecimal getYearMoreRate() {
		return yearMoreRate;
	}

	public void setYearMoreRate(BigDecimal yearMoreRate) {
		this.yearMoreRate = yearMoreRate;
	}

	public void init() {
		if(year5Count!=null && totalCount!=null ) {
			year5Rate = BigDecimalUtil.getDivideRate(new BigDecimal(year5Count), new BigDecimal(totalCount));
		}
		
		if(year14Count!=null && totalCount!=null ) {
			year14Rate = BigDecimalUtil.getDivideRate(new BigDecimal(year14Count), new BigDecimal(totalCount));
		}
		
		if(year44Count!=null && totalCount!=null ) {
			year44Rate = BigDecimalUtil.getDivideRate(new BigDecimal(year44Count), new BigDecimal(totalCount));
		}
		
		if(year60Count!=null && totalCount!=null ) {
			year60Rate = BigDecimalUtil.getDivideRate(new BigDecimal(year60Count), new BigDecimal(totalCount));
		}
		
		if(yearMoreCount!=null && totalCount!=null ) {
			yearMoreRate = BigDecimalUtil.getDivideRate(new BigDecimal(yearMoreCount), new BigDecimal(totalCount));
		}
	}
	
	
	
 	

}
